using SurveySez.Model;

namespace SurveySez.ViewModel.Editor
{
	public class EmceeSurveyHeaderViewModel
	{
		private EmceeSurvey _emceeSurvey;

		public EmceeSurveyHeaderViewModel(EmceeSurvey emceeSurvey)
		{
			_emceeSurvey = emceeSurvey;
		}

		public EmceeSurvey EmceeSurvey
		{
			get { return _emceeSurvey; }
		}

		public string Question
		{
			get { return _emceeSurvey.Survey.Question; }
		}

		public override bool Equals(object obj)
		{
			if (obj == this)
				return true;
			EmceeSurveyHeaderViewModel that = obj as EmceeSurveyHeaderViewModel;
			if (that == null)
				return false;
			return this._emceeSurvey == that._emceeSurvey;
		}

		public override int GetHashCode()
		{
			return _emceeSurvey.GetHashCode();
		}
	}
}
